<template>
  <div>
    <el-container>
      <el-main>
        <div class="mbx p-4">
          <el-breadcrumb separator="/">
            <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
            <el-breadcrumb-item>技术文档</el-breadcrumb-item>
            <el-breadcrumb-item>Vue</el-breadcrumb-item>
          </el-breadcrumb>
        </div>
        <div class="mbx mt-4 p-4" v-for="(item, index) in arrData" :key="index">
          <h3>{{ item.title }}</h3>
          <p v-html="item.content"></p>
          <el-empty description="内容去哪了？"></el-empty>
        </div>
      </el-main>
    </el-container>
  </div>
</template>

<script>
export default {
  name: "MyDetails",
  data() {
    return {
      arrData: [],
      wid: "",
      title: "",
      content: "",
    };
  },
  methods: {
    datails() {
      var newsID = this.$route.query.id;
      this.$axios
        .get("http://127.0.0.1/user/datails", {
          params: {
            wid: newsID,
          },
        })
        .then((res) => {
          this.arrData = res.data;
        })
        .catch((err) => {
          console.log("操作失败" + err);
        });
    },
  },
  mounted() {
    this.datails();
  },
};
</script>

<style>
</style>